import { IsEmail, IsNotEmpty, IsString, minLength } from "class-validator";

export class loginData {
  @IsNotEmpty()
  type: string;
  @IsNotEmpty()
  @IsString()
  user_name: string;
  @IsNotEmpty()
  @IsString()
  user_password: string;
}

export class registerData {
  @IsEmail()
  user_name: string;
  @IsNotEmpty()
  code: number;
  @IsNotEmpty()
  user_password: string;
  @IsNotEmpty()
  user_nickname: string;
}

export class forgetData {
  @IsNotEmpty({ message: "密码不能为空" })
  user_password: string;
  @IsNotEmpty({ message: "邮箱不能为空" })
  @IsEmail({ message: "邮箱不能为空" })
  user_name: string;
  @IsNotEmpty({ message: "验证码不能为空" })
  code: string;
}
